<?xml version='1.0' encoding='utf-8' ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
		<title>ELK Integration</title>
		<link type="text/css" rel="stylesheet" href="PLUGINS_ROOT/org.polarsys.capella.doc/html/styles.css"/>
	</head>
	<body>
		<h1 id="ELK_Integration">ELK Integration</h1>
		<p>The Eclipse Layout Kernel (or ELK) provides a collection of layout algorithms. Sirius diagrams, on
			the other side, can be extended to use such algorithms when performing 
			<b>
				<i>Layout</i>
			</b> command.
		</p>
		<p>Some of these layout algorithms have been integrated into Capella Diagrams to improve 

			<b>
				<i>Layout All</i>
			</b> action from the diagram toolbar.
		</p>
		<p>When using the 
			<b>Capella ELK integration</b> Feature, the default layout algorithm is replaced by
			an ELK algorithm.
		</p>
		<h2 id="Selecting_an_algorithm">Selecting an algorithm</h2>
		<p>To change the layout algorithm for an open diagram, select the background of diagram and in the 

			<b>
				<i>Rulers &amp; Grid</i>
			</b> tab of 
			<b>
				<i>Properties</i>
			</b> view, select an option from the 

			<b>
				<i>Algorithm</i>
			</b> list.
		</p>
		<p><center>
			<img width="300" border="0" src="Images/captures/AlgorithmProperties.PNG"/></center>
		</p>
		<p>
			<b>
				<i>Default</i>
			</b> algorithm will restore the default behavior for 
			<b>
				<i>Layout</i>
			</b> actions 
			implemented by Draw2D.
		</p>
		<h2 id="Samples">Samples</h2>
		<p>This section shows the influence of algorithm on 
			<b>
				<i>Layout All</i>
			</b> action.
		</p>
		<p>For the same Architecture Blank diagram, the choice of algorithm leads to different results.</p>
		<table>
			<tr>
				<th>Algorithm               </th>
				<th>
					<b>
						<i>Layout All</i>
					</b> result
				</th>
			</tr>
			<tr>
				<td>
					<i>ELK Layer Horizontal</i> 
				</td>
				<td style="text-align:center;">
					<img width="443" align="middle" border="0" src="Images/captures/LAB-Result-horizontal.PNG"/> 
				</td>
			</tr>
			<tr>
				<td>
					<i>ELK Layer Vertical</i>   
				</td>
				<td style="text-align:center;">
					<img width="230" align="middle" border="0" src="Images/captures/LAB-Result-vertical.PNG"/> 
				</td>
			</tr>
			<tr>
				<td>
					<i>Default</i>              
				</td>
				<td style="text-align:center;">
					<img width="206" align="middle" border="0" src="Images/captures/LAB-Result-default.PNG"/> 
				</td>
			</tr>
		</table>
		<h2 id="Caveats">Caveats</h2>
		<p>ELK layouts are not compatible with the 
			<b>
				<i>Snap to Grid</i>
			</b> feature. When using any ELK 
			algorithm, you should disable this option. Otherwise Ports and Lines may be misplaced.
		</p>
		<p>This feature is considered experimental due to remaining issues with the ELK behavior and its 
			integration in Sirius. </p>
		<p>This feature has primarily been tested on Physical Architecture Blank diagrams.
			An ELK algorithm is selected for each diagram type, but not all of them have necessarily been 
			tested. 
			The sets of choices of algorithm and their corresponding option settings can certainly be improved.</p>
	</body>
</html>